package com.fortune.rainshine.feign.system;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.system.CustomerCardModel;
import com.fortune.rainshinecommon.model.system.CustomerServiceTotalModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "rain-shine-system",configuration = FeignConfig.class)
@Controller
public interface CustomerCardFeign {
    @PostMapping("/customerCard/add")
    @ResponseBody
    MsgModel addCard(@RequestBody CustomerCardModel model);

    /**
     * 会员卡购买记录列表
     * @param parms
     * @return
     */
    @PostMapping("/customerCard/list")
    @ResponseBody
    MsgModel cardList(@RequestBody ParmsModel parms);

    @PostMapping("/customerCard/getListByCustomerId")
    @ResponseBody
    List<CustomerServiceTotalModel> getListByCustomerId(@RequestBody Integer customerId);
}
